package com.example.mybatisplus.model.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author zzy
 * @since 2024-06-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="HygieneCheck对象", description="")
public class HygieneCheck extends Model<HygieneCheck> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "卫生检查记录ID")
    @TableId(value = "ID", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "房间ID")
    private Long room;

    @ApiModelProperty(value = "宿管ID")
    private Long dormitoryAdmin;

    @ApiModelProperty(value = "卫生检查分数")
    private Integer grade;

    @ApiModelProperty(value = "卫生检查时间")
    private LocalDateTime checkTime;

    @ApiModelProperty(value = "逻辑删除")
    private Integer isDeleted;

    @ApiModelProperty(value = "修改时间")
    private LocalDateTime modifiedTime;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createdTime;

    @TableField(exist = false)
    private String roomName;
    @TableField(exist = false)
    private String buildingName;
    @TableField(exist = false)
    private String dormitoryAdminName;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
